Sorting integers in Java with extra condition

welcome to shbcf.ru